package com.sunchangming.stmdb;

import static org.junit.Assert.*;

import java.nio.ByteBuffer;

import org.apache.log4j.BasicConfigurator;
import org.junit.BeforeClass;
import org.junit.Test;

public class PageManagerTest {

	@BeforeClass
	public static void setUpBeforeClass() throws Exception {
		BasicConfigurator.configure();
	}


	
	@Test
	public void test() throws java.io.IOException{
		PageManager pm=new PageManager("test"); 
	}

	@Test
	public void byteBufferTest(){
		ByteBuffer bb=ByteBuffer.allocateDirect(1024*1024);
		System.out.println(bb.getInt());
		bb.putInt(2000);
		bb.flip();						
		((sun.nio.ch.DirectBuffer)bb).cleaner().clean();
		//bb.getInt();
		//System.out.println(bb.getInt());
	}
}
